home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet 53
/
INTERNET53.iso
/
mac
/
SOFTWARE
/
MAC
/
MULTIMEDIA
/
SOUNDEFFECTS
/
SOUNDEFFECTS-092.HQX
/
SoundEffects 0.9.2 %c4
/
SoundEffects Developer%d5s Kit
/
Interfaces
/
ModSetups.h
< prev
next >
Wrap
Text File
|
1994-09-06
|
3KB
|
68 lines
// Use these values in the 'type' Put these values in the 'param' field…
// field…
enum
{
type_ignore = 0, // unused.
type_button, // ProcPtr to an action procedure.
type_checkBox, // Ptr to a short, true if ON, false if OFF.
type_checkBoxNoSave,
type_radioButton, // Ptr to a short, containing the index of the
type_radioButtonNoSave, // active radio button in the group. Pass the same
// pointer to the same short to every radio button
// in the same group. Indexes start from 1.
type_unitsPopup, // Ptr to a short, containing one of the values
// defined in ModUnits.h.
type_editFieldUnitDependent, // Ptr to an unsigned long, containing a value
type_editFieldUnitDependentNoSave, // in bytes. There MUST be a type_unitsPopup item
// if one or more of these is present. Conversions
// are handled automatically, but the value in the
// variable will always be in bytes.
type_editFieldNumerical, // Ptr to a long.
type_editFieldNumericalNoSave,
type_editFieldNumDecimal, // Ptr to a double.
type_editFieldNumDecimalNoSave,
type_editField, // StringPtr.
type_editFieldNoSave,
type_customItem // Ptr to a SettCustomItemRec record.
// if the saveProc field of the record is 0L,
// the custom item’s data won’t be remembered
// with the setups.
};
// The 'NoSave' types will not be remembered with the setups, but will work the same
// way as the others otherwise.
typedef struct {
ProcPtr actionProc;
ProcPtr drawProc;
ProcPtr saveProc;
long refCon;
} SettCustomItemRec;
enum
{
customItemMsg_init = 1,
customItemMsg_hit,
customItemMsg_close,
customItemSaveMsg_save,
customItemSaveMsg_load
};
// type_button procedures should be declared as:
// OSErr ButtonProcedure(DialogPtr myDlog, short itemHit, short additionalItems)
// where itemHit is the index of the button item in the DITL, but since there are
// other items in the dialog, if you want to call one of the Dialog Manager routines,
// you have to pass it additionalItems+itemHit as the item number.
//
// type_button and type_customItem procedures should return:
// 1 - if everything was fine,
// 0 - if you want to dismiss the dialog as if the user clicked OK,
// kModCancel - if you want to dismiss the dialog as if the user clicked Cancel,
// -1 - if the setups pop-up menu is shown and you just changed
// something so the values are now different from the ones
// corresponding to any selected setup.
// any other value - if you want to cancel and report the corresponding error,